package com.gg.star.controller;

import java.io.IOException;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.springframework.beans.factory.annotation.Autowired;

import com.gg.star.service.StarService;

import base.BaseServlet;

@WebServlet("/star/RemoveStarBySidServlet")
public class RemoveStarBySidServlet extends BaseServlet {
	
	@Autowired
	private  StarService  starService;
	
	protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
		String sid =   request.getParameter("sid");
		String  uid =  request.getParameter("uid");
		starService.removeStarBySid(sid);
		
		response.sendRedirect("/fruits/star/ShowStarsByUidServlet?uid="+uid);
		
	}

	

}
